/**
 * @file cmd_hardinfo.c
 * @brief 
 * @author  ()
 * @version 1.0
 * @date 2024-09-13
 * 
 * @copyright Copyright (C) 2019 Queclink Wireless Solutions (ShenZhen) Co., Ltd. All Rights Reserved.
 * 
 * @par 修改日志:
 * <table>
 * <tr><th>Date       <th>Version <th>Author  <th>Description
 * <tr><td>2024-09-13 <td>1.0     <td>     <td>内容
 * </table>
 */
#include "lettershell/shell.h"

#include "../shell_log.h"
#include "misc/version.h"
#include "hal_adapter.h"

#include "misc/hwmisc.h"

const  unsigned char cRevisionDate[12] = __DATE__;
const  unsigned char cRevisionTime[16] = __TIME__;

#include "modem/qlmodem/include/qlmodemconfdefs.h"

/// @brief 调试打印硬件信息
/// @param  
/// @return 
int32_t cmd_hardware_info(void)
{   
    printf("iot softver: %s\r\n", SOFTWARE_VERSION);
    printf("iot modem lib: %s\r\n", qlmodem_version);
    printf("iot hardver: %s\r\n", get_hw_ver());
    printf("iot build date:%s %s\r\n", cRevisionDate, cRevisionTime);
    
    return 0;
}

SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0) | SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC) | SHELL_CMD_DISABLE_RETURN,
                 hardware_info, cmd_hardware_info, show hardware info);
